<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
	<meta http-equiv="Cache-control" content="no-cache,no-store,must-revalidate" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Expires" content="-1" />
	<meta name="renderer" content="webkit">
	<title><!-- if $title -->{$title}_<!-- /if --><!-- if $seo.title -->{$seo.title}_<!-- /if -->{$config.title}</title>
	<!-- if $seo.keywords --><meta name="keywords" content="{$seo.keywords}" /><!-- /if -->
	<!-- if $seo.description --><meta name="description" content="{$seo.description}" /><!-- /if -->
	<meta name="toTop" content="true" />
	{$config.meta}
	<base href="{$sys.url}" />
	<link rel="stylesheet" type="text/css" href="{#css#}/artdialog.css" />
	<!-- if $config.favicon -->
	<link rel="shortcut icon" href="{$config.favicon}" />
	<!-- /if -->
	<script type="text/javascript" src="{url ctrl=js ext=jquery.artdialog/}" charset="utf-8"></script>
	<style type="text/css">
	*{font-size:14px;font-family:'Arial','微软雅黑','宋体','黑体'}
	.main{width:500px;margin:200px auto;}
	.main table{
		width:100%;
		border:0;
	}
	.main img{
		border:0;
		max-width:100%;
	}
	</style>
</head>
<body>
<div class="main">
	<table>
	<tr>
		<th colspan="2">微信扫码支付</th>
	</tr>
	<tr>
		<td align="right">费用：</td>
		<td>{func price_format $order.price $order.currency_id}</td>
	</tr>
	<tr>
		<td colspan="2" align="center">
			<img src="api.php?f=qrcode&data={func rawurlencode $qrcode}" width="300px" height="300px" />
		</td>
	</tr>
	<tr>
		<td colspan="2" align="center"><input type="button" value="返回订单" onclick="$.phpok.go('{url ctrl=order func=info sn=$order.sn passwd=$order.passwd/}')" /></td>
	</tr>
	</table>
</div>
<script type="text/javascript">
function pending()
{
	var url = api_url('payment','query','sn={$sn}');
	$.phpok.json(url,function(data){
		if(data.status && data.status == 2){
			window.setTimeout("pending()", 3000);
			return true;
		}
		if(data.status){
			var url = get_url('payment','show','id={$logid}');
			$.phpok.go(url);
			return true;
		}
		$.dialog.alert(data.info);
		return false;
	})
}
$(document).ready(function(){
	window.setTimeout("pending()", 5000);
});

//禁止后退
history.pushState(null, null, document.URL);
window.addEventListener('popstate', function () {
    history.pushState(null, null, document.URL);
});
</script>
</body>
</html>